<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>属性选择器</title>
    <style type="text/css">
      [class="name"] {
        color: red;
      }
      [class="pwd"] {
        background-color: yellow;
        color: red;
      }
    </style>
  </head>
  <body>
    <div class="name">name</div>
    <div class="pwd">pwd</div>
  </body>
</html>
